from nodes import toNum
import networkx as nx

def find(v,p):
  for k in p:
    if p[k] == v:
      return k

rG,p = toNum("../test_flatten.g")
k = 57562
v = find(k,p)
for nb in nx.all_neighbors(rG,k):
  print(find(nb,p),rG.get_edge_data(k,nb))